package cn.cf.kxx;

import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;

import com.tencent.bugly.crashreport.CrashReport;

import cn.cf.kxx.service.SerialService;

public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        CrashReport.initCrashReport(getApplicationContext(), "76d869de83", true);
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
    }

    public static Intent service;

    public static void startService(Activity activity){
        service = new Intent(activity, SerialService.class);
        service.setAction(SerialService.action);
        activity.startService(service);
    }

}
